class Animal{
    public String name;
    public int age;
}
class Dog extends Animal{


    public Dog(String name, int age) {
        this.name = name;
        this.age = age;
    }

    public void eat(){
        System.out.println(this.name + " " + "正在吃狗粮");
    }
}
class Cat extends Animal{


    public Cat(String name, int age) {
        this.name = name;
        this.age = age;
    }

    public void eat(){
        System.out.println(this.name + " " + "正在吃猫粮");
    }
}
public class Text {
    Dog dog = new Dog("汪汪",1);
    Cat cat = new Cat("喵喵",3);
}
